package com.unitech.drinks.model;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_drink")
public class Drink {

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    private Long id;

    @Column(name = "name")
    @NotBlank(message = "名字不能为空")
    private String name;

    @Column(name = "price")
    private BigDecimal price;

    @Column(name = "create_time")
    private LocalDateTime createTime;

    @Column(name = "category_id")
    private Long categoryID;



}
